<?php
namespace app\common\model;

use think\Model;

/**
 * Class AdminUser
 * @package app\common\model
 */
class PushLog extends Model
{
    /**
     * 添加一条记录
     *
     * @author mayy
     * @date 2017-8-15
     * @param array $data
     * @return  integer|boolean
     */
    public function addData(array $data)
    {
        $asset_data = $data;
        $asset_data['add_time'] = NOW_DATE;

        $res = $this->allowField(true)->data($asset_data,true)->isUpdate(false)->save();
        $return = ($res && isset($this->id) && $this->id > 0) ? $this->id : false;
        return $return;
    }

}